#if !defined(_PACKET_H_)
#define _PACKET_H_

#define PACKET_LEN(a) (a+4) 

unsigned char calc_cs(const unsigned char *_buffer, size_t _len);

int build_packet(unsigned char *_dst, const unsigned char *_src, size_t _len, size_t _buff_len);

int parse_packet(const unsigned char *_src, unsigned int _src_len,  const unsigned char **_dst, unsigned int *_dst_len);

void dump_packet(const unsigned char *_src, unsigned int _src_len);

#endif
